{extend name="layout/detail" /}
{block name="content"}
<div class="td-content-wrap p20">
    <div class="td-content-header">
        <h1>网站基本信息</h1>
    </div>
    <hr>
    <div class="space-20"></div>
    <form id="form_data" class="layui-form" method="post">
        <input type="hidden" name="data_type" value="site">
        <div class="layui-form-item">
            <label class="layui-form-label">网站名：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_name" name="site_name" check="required"
                       info="网站名"
                       value="{$system_data.site_name|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_title" name="site_title" check="required"
                       info="标题"
                       value="{$system_data.site_title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">网站描述：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_desc" name="site_desc" check="required"
                       info="网站描述"
                       value="{$system_data.site_desc|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">网站关键词：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_keyword" name="site_keyword" check="required"
                       info="网站关键词"
                       value="{$system_data.site_keyword|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客服QQ：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_kf_qq" name="site_kf_qq" check="required"
                       info="客服QQ" value="{$system_data.site_kf_qq|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客服联系方式：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="site_kf_phone" name="site_kf_phone" check="required"
                       info="客服联系方式" value="{$system_data.site_kf_phone|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">展示关闭网站：</label>
            <div class="layui-input-block w40">
                <input type="radio" name="site_is_close" title="否" value="0"
                       td-checked="{$system_data.site_is_close|default=''}">
                <input type="radio" name="site_is_close" title="是" value="1"
                       td-checked="{$system_data.site_is_close|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">平台LOGO：</label>
            <div class="layui-input-block">
                <div class="image-upload">
                    <div class="input">
                        <input type="hidden" class="image-url" name="site_logo" value="{$system_data.site_logo|default=''}">
                    </div>
                    <div class="image-upload-btn">
                        上传图片（190*70）
                    </div>
                    <div class="image">

                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">slogan：</label>
            <div class="layui-input-block w40">
                <input type="text" class="layui-input" id="system_slogan" name="system_slogan" check="required"
                       info="请输入网站slogan" value="{$system_data.system_slogan|default=''}">
            </div>
        </div>
        <hr>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <div class="layui-input-block">
                <a class="layui-btn" lay-submit="" lay-filter="demo2" onclick="save();">保存</a>
                <a class="layui-btn layui-btn-primary" onclick="go_return_url();">取消</a>
            </div>
        </div>
    </form>
</div>
{/block}

{block name="script"}
<script>
    layui.use(['common', 'uploader', 'element'], function () {
        var fn = {
            save: function () {
                send_form("form_data", "{:url('save')}", function (ret) {
                    if (ret.code) {
                        layer.msg(ret.msg, {
                            time: 1200
                        }, function () {
                            location.reload(true);
                        });
                    } else {
                        layer.msg(ret.msg);
                        return false;
                    }
                });
            }
        };
        win_exp(fn);
    });
</script>
{/block}